﻿using MyECommerceProject.Models;

namespace MyECommerceProject.Interfaces
{
    public interface IProductService
    {
        Task<IEnumerable<Product>> GetProductsAsync();
        Task<Product> GetProductByIdAsync(int productId);
        Task AddProductAsync(Product product);
        Task UpdateProductAsync(Product product);
        Task DeleteProductAsync(int productId);
        Task<IEnumerable<Product>> GetProductsSortedByAsync(Func<Product, object> keySelector, bool ascending = true);
        Task<IEnumerable<Product>> GetProductsFilteredByAsync(Func<Product, bool> predicate);

        Task<IEnumerable<Product>> GetProductsByOptionAsync(ProductSearchOption option);
    }
}
